Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose IPv6 and IPv4 assigned addresses as computed properties #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bltavares
Copy link
Contributor

@bltavares bltavares commented Mar 17, 2019

Currently, the ip_assignments has a list of the IPs that ZeroTier
provided to the member from its assignment pool. It contains a mix of
IPv4 and IPv6 addresses.

There is some scenarios where having the distiction of wheter it is an
IPv4 or IPv6 changes which resource to create. For example using DNS
records we are only allowed to create AAAA records in the presence of
IPv6 addresses, and A records to IPv4.

Filtering this information on Terraform is cumbersome, using the filter
on list operations, while it is much easier to provide this information
through the provider.

This commit create two extra computed properties, ipv6_assignments and
ipv4_assignments, which separates each address assignment as expected.

The ipv6_assignments does not include RFC4139 nor 6PLANE addresses as
they are always computed on the member resource level, even if the
network is configured to not use those addresses, and their
information is not returned by the controller API as an assigned
address either.

@bltavares bltavares force-pushed the exposes-assigned-ipv6s-ipv4s-computed branch from 7b98b58 to 681e299 Compare March 17, 2019 18:13
Currently, the `ip_assignments` has a list of the IPs that ZeroTier
provided to the member from its assignment pool. It contains a mix of
IPv4 and IPv6 addresses.

There is some scenarios where having the distiction of wheter it is an
IPv4 or IPv6 changes which resource to create. For example using DNS
records we are only allowed to create `AAAA` records in the presence of
IPv6 addresses, and `A` records to IPv4.

Filtering this information on Terraform is cumbersome, using the filter
on list operations, while it is much easier to provide this information
through the provider.

This commit create two extra computed properties, `ipv6_assignments` and
`ipv4_assignments`, which separates each address assignment as expected.

The `ipv6_assignments` does not include RFC4139 nor 6PLANE addresses as
they are always computed on the `member` resource level, even if the
`network` is configured to not use those addresses, and their
information is not returned by the controller API as an assigned
address either.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant